Ultra-low power wakeup circuit device

ABSTRACT

An ultra-low power wakeup circuit device includes a keyboard, a key scan circuit, a storage unit, and a comparator unit. The key scan circuit sequentially outputs scanning signals from the first scan line to N-th scan line for acquiring N key scan data. The key scan circuit performs an XOR operation on the N key scan data to generate a current key scan data. The storage unit is connected to the key scan circuit for receiving the current key scan data and storing the current key scan data as a previous key scan data. The comparator unit is connected to the key scan circuit and the storage unit for comparing the current key scan data with the previous key scan data. When the current key scan data is different from the previous key scan data, the comparator unit generates a wakeup signal.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the technical field of key scanningand, more particularly, to an ultra-low power wakeup circuit device.

2. Description of Related Art

With the advanced technologies, the electronic skills have beendeveloped from the earliest vacuum tubes and transistors to theintegrated circuit (IC) chips, which have been widely used. Thus, avariety of electronic products have gradually become indispensablenecessities in daily living for modern people. Many articles have beenincreasingly electrized for the purpose of convenient use.

Many control methods used in electronic products, such as computers,mobile phones, and the like, typically use a button control. Generallyspeaking, the methods of detecting the scanning of keyboard buttons aregrouped into two types, i.e., a matrix-type scan and a triangular-typescan.

FIG. 1 is a schematic diagram illustrating a circuit of a typicaltriangular-type scan keyboard. As shown in FIG. 1, the circuit includesa triangular-type scan keyboard controller 100, six vertical scan linesVS11-VS16, six horizontal scan lines HS11-HS16, and six I/O pinsIO0-IO5. When a keyboard button detection starts, the I/O pins IO0-IO5of the horizontal scan lines HS11-HS16 sequentially output scan pulses.More particularly, when one of the I/O pins IO0-IO5 outputs the scanpulse, the remaining pins perform the detection. For example, when theI/O pin IO1 outputs the scan pulse, the I/O pins IO1-IO5 perform thedetection. Further, if the I/O pin IO1 outputs the scan pulse and thebutton 101 is pressed, the vertical scan line VS15 and the horizontalscan line HS11 are short-circuited. Accordingly, the scan pulse isreceived by the I/O pin IO4. In this case, the triangular-type scankeyboard controller 100 can determine that the button 101 is pressed.

As compared with a matrix-type scan keyboard, both have the keyboardcontroller with six I/O pins, but the triangular-type scan keyboardcontroller 10 can control 15 buttons while the matrix-type scan keyboardcontroller can control 9 buttons. In other words, under theconsideration of the I/O resources of an integrated circuit (IC), thetriangular-type scan keyboard controller can reduce the number of usedI/O pins in view of the same number of buttons to be controlled.

However, the triangular-type scan keyboard controller chip typicallyconsumes the current ranging from several hundreds of μA to several mA,which is still acceptable with respect to a high-power system butunacceptable by, for example, the sleep current of a remote controllerthat is limited to several μA.

To reduce the current consumption, US Patent Publication No.2010/0259424 has disclosed a power saving method in a sleep mode. Themethod provides a first clock source and a second clock source, whereina frequency of the second clock source is much lower than a frequency ofthe first clock source. In a normal mode, a scan pulse from the I/O pinsis sequentially outputted according to the frequency of the first clocksource. In the sleep mode, the scan pulse from the I/O pins issequentially outputted according to the frequency of the second clock.Namely, in the sleep mode, the second clock source with relatively lowerfrequency is used to reduce the current consumption.

However, for either the matrix-type or the triangular-type scankeyboard, the keys may be blocked due to the humidity or other factors.For example, a user, who sits on a sofa and uses a remote control toselect and watch one program, may sit on the remote control incarelessness, so that the keyboard controller chip cannot enter in thesleep mode and thus wastes the power.

Therefore, it is desirable to provide an improved ultra-low power wakeupcircuit device to mitigate and/or obviate the aforementioned problems.

SUMMARY OF THE INVENTION

The object of the present invention is to provide an ultra-low powerwakeup circuit device, which can reduce the power consumption and can beused in a handheld device to prolong the use life. In addition, thecapacity of a storage device required in the ultra-low power wakeupcircuit device can be reduced.

According to a feature of the invention, an ultra-low power wakeupcircuit device is provided, which includes a keyboard, a key scancircuit, a storage unit, and a comparator unit. The keyboard has N scanlines, and every two scan lines has a key in-between, where N is aninteger greater than one. The key scan circuit is connected to the Nscan lines for sequentially outputting scanning signals of the firstscan line to N-th scan line in a predetermined time, thereby acquiring Nkey scan data of the N scan lines when a desired key is pressed and twoscan lines corresponding to the desired key are short-circuited. The keyscan circuit processes the N key scan data for generating a current keyscan data. The storage unit is connected to the key scan circuit forreceiving the current key scan data and storing the current key scandata as a previous key scan data. The comparator unit is connected tothe key scan circuit and the storage unit for comparing the current keyscan data with the previous key scan data. When the current key scandata is different from the previous key scan data, the comparator unitgenerates a wakeup signal.

Other objects, advantages, and novel features of the invention willbecome more apparent from the following detailed description when takenin conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating a circuit of a typicaltriangular-type scan keyboard;

FIG. 2 is a block diagram of an ultra-low power wakeup circuit deviceaccording to the invention;

FIG. 3 is a schematic diagram of an operation of a key scan circuitaccording to the invention;

FIG. 4 is a schematic diagram of another operation of a key scan circuitaccording to the invention;

FIG. 5 is a schematic diagram of a further operation of a key scancircuit according to the invention;

FIG. 6 is a schematic diagram of a still further operation of a key scancircuit according to the invention;

FIG. 7 is a schematic diagram of another key scan circuit according tothe invention; and

FIG. 8 is a schematic diagram of an operation of another key scancircuit according to the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The invention provides an ultra-low power wakeup circuit device, whichis used in a keyboard. FIG. 2 is a block diagram of the ultra-low powerwakeup circuit device 200 according to the invention, which includes akeyboard 210, a key scan circuit 220, a storage unit 230, a comparatorunit 240, a microprocessor unit 250, and at least one functional block260.

The keyboard 210 has N scan lines 211, with a key installed in betweenevery two of the N scan lines, where N is an integer greater than one.The keyboard 210 is a triangular-type scan keyboard with N×(N−1)/2 keys.In this embodiment, N is 6 for convenient description.

The key scan circuit 220 is connected to the N scan lines 211. The keyscan circuit 220 sequentially outputs scanning signals of the first scanline to N-th scan line in a predetermined time. When a desired key ispressed, two scan lines corresponding to the desired key areshort-circuited, and N key scan data of the N scan lines is acquired.The key scan circuit processes the N key scan data for generating acurrent key scan data.

The storage unit 230 is connected to the key scan circuit 220 forreceiving the current key scan data and storing the current key scandata as a previous key scan data. The storage unit 230 is an N-bitstorage device.

The comparator unit 240 is connected to the key scan circuit 220 and thestorage unit 230. The comparator unit 240 compares the current key scandata with the previous key scan data. When the current key scan data isdifferent from the previous key scan data, the comparator unit 240generates a wakeup signal, denoted as “wakeup”. When the current keyscan data is identical to the previous key scan data, the comparatorunit 240 does not generate the wakeup signal “wakeup”.

The microprocessor unit 250 is connected to the comparator unit 240 andthe keyboard 210. The microprocessor unit 250 has a sleep mode and awork mode. When the comparator unit 240 generates the wakeup signal“wakeup”, the microprocessor unit 250 changes from the sleep mode intothe work mode according to the wakeup signal “wakeup”. When thecomparator unit 240 does not generate the wakeup signal “wakeup”, themicroprocessor unit 250 remains in the sleep mode. The microprocessorunit 250 has multiple I/O pins connected to the N scan lines 211 of thekeyboard 210 in order to acquire a key pressed by a user for a furtherprocessing.

When the microprocessor unit 250 is in the sleep mode, the at least onefunctional block 260 does not work.

FIG. 3 is a schematic diagram of an operation of the key scan circuit220 according to the invention. As shown in FIG. 3, the key scan circuit220 generates the current key scan data to indicate that no key in FIG.3 is pressed. In addition, “x” in 00000x(A) in FIG. 3 indicates that thekey scan circuit 220 outputs a scan pulse from the scan linecorresponding to the I/O pin IO0 while the other scan linescorresponding to the I/O pins IO1-IO5 perform a detection.

Each of the N key scan data has N bits (in this example, 6 bits). When akey between an i-th scan line and a j-th scan line is pressed, the i-thand j-th bits of the key scan data corresponding to the key is 1b (“1”in binary), where i and j are each an index value. When the key betweenan i-th scan line and a j-th scan line is not pressed, the i-th bit andj-th bit of the corresponding key scan data is 0b (“0” in binary).

Since no key is pressed, the N key scan data includes “00000x(A)”,“0000x0(B)”, “000x00(C)”, “00x000(D)”, “0x0000(E)”, and “x00000(F)”.

The key scan circuit 220 performs an XOR operation on the N key scandata for generating the current key scan data, denoted as Save Data,with N bits. The current key scan data Save Data=A^B^C^D^E^F=0 0 0 0 00, where ^ indicates an XOR operation. When the XOR operation isperformed, “x” is regarded as “0”. The storage unit 230 is connected tothe key scan circuit 220 in order to temporarily store the current keyscan data Save Data (=000000) as a previous key scan data.

FIG. 4 is a schematic diagram of another operation of the key scancircuit 220 according to the invention, in which one key is pressed andthe key scan circuit 220 generates the current key scan data. As shownin FIG. 4, the pressed key is located on the scan lines corresponding tothe I/O pins IO4 and IO5, and in this case the key scan circuit 220generates the N current key scan data, i.e., “00000x(A)”, “0000x0(B)”,“000x00(C)”, “00x000(D)”, “1x0000(E)”, and “x10000(F)”. Thus, thecurrent key scan data Save Data=A^B^C^D^E^F=1 1 0 0 0 0.

The comparator unit 240 compares the current key scan data Save Data(=110000) with the previous key scan data (=000000). Because the twodata are different, i.e., the key A shown in FIG. 4 is pressed, thecomparator unit 240 generates a wakeup signal “wakeup” to change themicroprocessor unit 250 from the sleep mode into the work mode.

In the case that the key A is blocked due to the humid climate or when auser sitting on a sofa and watching a TV program sits on the remotecontrol in carelessness, the current key scan data Save Data surelyremains in “110000” if no key is further pressed after a predeterminedtime, and the comparator unit 240 does not generate the wakeup signal“wakeup”. Thus, the microprocessor unit 250 in the work mode enters inthe sleep mode to save the power. It is sure that the key scan circuit220, the storage unit 230, and the comparator unit 240 still work forscanning the keys on the keyboard 210 after the microprocessor unit 250enters in the sleep mode. The scan frequency of the key scan circuit 220can be, for example, 4 KHz.

FIG. 5 is a schematic diagram of a further operation of the key scancircuit 220 according to the invention. As shown in FIG. 5, two keys A,B are pressed, which is shown in the first column. In this case, the keyscan circuit 220 generates the N current key scan data, i.e.,“00000x(A)”, “0100x0(B)”, “000x00(C)”, “00x000(D)”, “1x0010(E)”, and“x10000(F)”. Thus, we have the current key scan data SaveData=A^B^C^D^E^F=1 0 0 0 1 0.

The second column in FIG. 5 shows that the key A is open and the key Bis pressed, and in this case the N key scan data includes “00000x(A)”,“0100x0(B)”, “000x00(C)”, “00x000(D)”, “0x0010(E)”, and “x00000(F)”.Thus, we have the current key scan data Save Data=A^B^C^D^E^F=0 1 0 0 10.

The third column in FIG. 5 shows that the key A is pressed and the key Bis open, and in this case the N key scan data includes “00000x(A)”,“0000x0(B)”, “000x00(C)”, “00x000(D)”, “1x0000(E)”, and “x10000(F)”.Thus, we have the current key scan data Save Data=A^B^C^D^E^F=1 1 0 0 00.

It is known from the current key scan data “Save Data” in the first,second, and third columns that the invention can detect all conditionsof two keys and avoid the microprocessor unit 250 from being unable toenter in the sleep mode due to blocking of a key and thus wasting thepower.

FIG. 6 is a schematic diagram of a still further operation of the keyscan circuit 220 according to the invention. As compared with FIG. 3,the difference is that the key scan circuit 220 in FIG. 3 performs anXOR operation on the N key scan data obtained after the N scan lines 211are scanned but, in FIG. 6, it performs the XOR operation on one keyscan data immediately after one scan line 211 is scanned. Therefore, inFIG. 3, it is necessary to store the N key scan data of the N scanlines. However, in FIG. 6, only one key scan data of one scan line isstored, so as to save more memory.

FIG. 7 is a schematic diagram of another key scan circuit 220 accordingto the invention. The N key scan data are in a form of N×N-bit matrix,and the key scan circuit 220 calculates the number of 1b in the uppertriangle of the N×N-bit matrix for generating the current key scan datawith 2 bits. In this case, the storage unit 230 is a 2-bit storagedevice. When the number of 1b in the upper triangle is zero, the currentkey scan data is 00b. When the number of 1b in the upper triangle isone, the current key scan data is 01b. When the number of 1b in theupper triangle is two, the current key scan data is 10b. Otherwise, thecurrent key scan data is 11b.

As shown in FIG. 7, when a user does not press any key, the number of“1” in the upper triangle of the N×N-bit matrix is zero, and the currentkey scan data is 00b. The storage unit 230 temporarily stores thecurrent key scan data Save Data (=00) as a previous key scan data.

FIG. 8 is a schematic diagram of an operation of another key scancircuit 220 according to the invention. As shown in FIG. 8, the keyscorresponding to the scan lines of the I/O pins IO4 and IO5 are pressed,and in this case the N key scan data includes “00000x(A)”, “0000x0(B)”,“000x00(C)”, “00x000(D)”, “1x0000(E)”, and “x10000(F)”. When the key Ais pressed by the user, a number of “1” in the upper triangle of theN×N-bit matrix is one, and the current key scan data is 01b.

The comparator unit 240 compares the current key scan data Save Data(=00b) with the previous key scan data Save Data (=01b). Since the twodata are different, the comparator unit 240 generates the wakeup signal“wakeup”. Since the key A is actually pressed in FIGS. 7 and 8, thewakeup signal “wakeup” can be used to change the microprocessor unit 250from the sleep mode into the work mode. As shown in FIGS. 3 and 4, whena key is blocked, the comparator unit 240 does not generate the wakeupsignal “wakeup”, and thus the microprocessor 250 in the work mode canenter in the sleep mode to save the power.

When a key in the multi-key keyboard is blocked and the microprocessorunit directly enters in the sleep mode, the blocked key causes a currentconsumption from several hundreds of μA to several tens of μA in theprior art, but the invention can reduce the current consumption toseveral μA. For example, if the pull down resistor is 10KΩ, the workvoltage is 3V, and one key is blocked in entering in the sleep mode, theprior art requires the current consumption of (3V/10K)*1=300 μA.However, in the invention, if the pull down resistor is 10KΩ, the workvoltage is 3V, and one key is blocked in entering in the sleep mode, thescan frequency of the key scan circuit 220 is 4 KHz, and the number ofkeys to be scanned is 20, so that the scan frequency of the blocked keyis 4000 Hz/20=200 Hz. In this case, if the key scan circuit 220 has ascan timer of 10 μsec, the scan time is 10 μsec*200=2 m sec, and theblocked key in the sleep mode consumes the current of ((3V/10K)*1*2 msec)≈0.6 μA. If each clock of the key scan circuit 220 consumes 1 μA-2μA, a total of current consumption is 1.6 μA-3 μA, which is much lowerthan the current (300 μA) consumed in the prior art. Furthermore, it mayhappen in the prior art that the microprocessor unit cannot enter in thesleep mode, the microprocessor unit cannot wake up as soon as enteringin the sleep mode, or the microprocessor unit cannot wake up from thesleep mode for normally working.

As cited, the prior art requires recording the state of each key beforethe microprocessor unit enters in the sleep mode, so that a comparisoncan be performed to generate a wakeup signal “wakeup” when a key ispressed. However, if there are 15 keys, it requires at least 15 bits torecord the state of each key, rather than 6 bits or even 2 bits as shownin the invention. When the number of keys is increased, the differencebetween the prior art and the invention is increased on the requiredbits. For example, if there are 101 keys, the prior art requires atleast 101 bits to record the states of each key, but the inventionrequires only 15 bits (15×14/2=105). In addition, when a key is blocked,the ultra-low power wakeup circuit device in the invention can allow themicroprocessor unit to enter in the sleep mode for reducing the powerconsumption and thus can be applied in a handheld device such as aremote control.

Although the present invention has been explained in relation to itspreferred embodiment, it is to be understood that many other possiblemodifications and variations can be made without departing from thespirit and scope of the invention as hereinafter claimed.

What is claimed is:
 1. An ultra-low power wakeup circuit device,comprising: a keyboard with N scan lines, having a key installed inbetween every two scan lines, where N is an integer greater than one; akey scan circuit connected to the N scan lines for sequentiallyoutputting scanning signals from first scan line to N-th scan line in apredetermined time, thereby acquiring N key scan data of the N scanlines when a specific key is pressed and two scan lines corresponding tothe specific key are short-circuited, the key scan circuit processingthe N key scan data to generate a current key scan data; a storage unitconnected to the key scan circuit for temporarily storing the currentkey scan data as a previous key scan data; and a comparator unitconnected to the key scan circuit and the storage unit for comparing thecurrent key scan data with the previous key scan data and generating awakeup signal when the current key scan data is different from theprevious key scan data; wherein the comparator unit does not generatethe wakeup signal when the current key scan data is identical to theprevious key scan data; further comprising a microprocessor unitconnected to the comparator unit and the keyboard and having a sleepmode and a work mode, wherein the microprocessor unit is based on thewakeup signal to change from the sleep mode to the work mode when thecomparator unit generates the wakeup signal, and remains in the sleepmode when the comparator unit does not generate the wakeup signal;wherein the keyboard is a triangular-type scan keyboard with Nx(N−1)/2keys; wherein each of the N key scan data has N bits, and when a keybetween i-th scan line and a j-th scan line is pressed, i-th and j-thbits of a key scan data corresponding to the key are each 1b; andwherein the N key scan data is in a form of N×N-bit matrix, and the keyscan circuit calculates a number of 1b in an upper triangle of theN×N-bit matrix for generating the current key scan data with 2 bits. 2.The device as claimed in claim 1, wherein the key scan circuit performsan XOR operation on the N key scan data for generating the current keyscan data with N bits.
 3. The device as claimed in claim 2, wherein thestorage unit is an N-bit storage device.
 4. The device as claimed inclaim 1, wherein the storage unit is a 2-bit storage device.
 5. Thedevice as claimed in claim 1, wherein the key scan circuit has a scanfrequency of 4 KHz.
 6. The device as claimed in claim 1, furthercomprising at least one functional block, which does not work when themicroprocessor unit is in the sleep mode.